package org.springblade.modules.admin.vo.sugar.estate;

import cn.hutool.core.convert.Convert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author zcc
 * @version 1.0
 * @date 2022/12/19 14:04
 */
@Data
public class BuildingInfoVo implements Comparable<BuildingInfoVo>{

	@ApiModelProperty("项目id")
	private Long buildingId;

	@ApiModelProperty("项目名称")
	private String buildingName;


	private Integer elevatorCounts;

	private BigDecimal ratio;

	@Override
	public int compareTo(BuildingInfoVo o) {

		return Convert.toInt(o.getRatio().multiply(Convert.toBigDecimal(1000)))-Convert.toInt(this.ratio.multiply(Convert.toBigDecimal(1000)));
	}
}
